﻿<html>
<head>
    <title>Jamendo Radio Configuration</title>
	<link rel="StyleSheet" href="styles/options.css" type="text/css">
	
    <script src="script/util.js"></script>
	<script src="script/context.js"></script>
	<script src="script/options.js"></script>
</head>
<body onload="restore_options(); restore_channels(); restore_scrobble();">
    <div id="accordion" class="ui-helper-hidden">
        <h3 index="0">
            <a href="#">Jamendo Radio</a></h3>
        <div>
            <div class="fg-toolbar ui-widget-header ui-corner-all ui-helper-clearfix">
                <div class="fg-buttonset fg-buttonset ui-helper-clearfix">
                    <button class="fg-button ui-state-default fg-button-icon-left ui-corner-all" onclick="restore_options();">
                        <span class="ui-icon ui-icon-refresh"></span>Restore</button>
                    <button class="fg-button ui-state-default fg-button-icon-left ui-corner-all" onclick="save_options();">
                        <span class="ui-icon ui-icon-disk"></span>Save</button>
                </div>
            </div>
				<fieldset class="ui-corner-all">
					<legend>Skin</legend>
					<select size="8" id="skin" onchange="preview_skin();">
						<option value="default">Default</option>
						<option value="IAC_Chiptune">IAC Chiptune</option>
					</select>
					<img id="skinPreview" />
				</fieldset>
                <fieldset class="ui-corner-all">
                    <legend>
                        <input type="checkbox" id="pageIntegration" style="width: 25px;" />Integrate with
                        Jamendo.com</legend>Make play buttons on jamendo.com play music in Jamendo Radio (this extension), and add context menus to artist and album pages.
                </fieldset>
				<fieldset class="ui-corner-all">
					<legend>
						<input type="checkbox" id="scrobble" style="width: 25px;" />Beta test: Scrobble to AudioScrobbler</legend>
							<div id="scrobblestatus" style="float:right;"></div>
							Send information of what music this extension is playing to your <a target="_blank" href="http://www.last.fm">Last.fm</a> AudioScrobbler account.<br />
							<span style="margin:0 5px 0 25px;">Username</span><input id="scrUsername" /><br />
							<span style="margin:0 8px 0 25px;">Password</span><input id="scrPassword" type="password" /><br />
				</fieldset>				
				<i>Note: Changes to credentials will only occur when both username and password is entered.
					To turn scrobbling on or off, please use the checkbox.</i>
        </div>
        <h3 index="2">
            <a href="#" id="channelButton">Channels</a></h3>
        <div>
            <div class="fg-toolbar ui-widget-header ui-corner-all ui-helper-clearfix">
                <div class="fg-buttonset ui-helper-clearfix">
                    <button class="fg-button ui-state-default fg-button-icon-left ui-corner-all" onclick="restore_channels();">
                        <span class="ui-icon ui-icon-refresh"></span>Restore</button>
                    <button class="fg-button ui-state-default fg-button-icon-left ui-corner-all" onclick="$('#presetContext').css('left', event.pageX -5).css('top', event.pageY -5).show(500)">
                        <span class="ui-icon ui-icon-plus"></span>Add preset</button>
                    <button class="fg-button ui-state-default fg-button-icon-left ui-corner-all" onclick="save_channels();">
                        <span class="ui-icon ui-icon-disk"></span>Save</button>
                </div>
            </div>
            <p>
                <span class="nameTitle">Name</span> <span class="configTitle">Configuration string</span>
            </p>
            <ul id="channels">
            </ul>
			<fieldset class="ui-corner-all">
				<legend>
					<input type="checkbox" id="skipDefault" style="width: 25px;" />Hide channel 'Top 500'
				</legend>
				Jamendo Radio comes with a channel named 'Top 500'. Check this box if you do not want this channel included.
			</fieldset>
        </div>
        <h3 index="3">
            <a href="#">Channel designer</a></h3>
        <div id="designer">
            <div class="fg-toolbar ui-widget-header ui-corner-all ui-helper-clearfix">
                <div class="fg-buttonset fg-buttonset ui-helper-clearfix">
                    <button class="fg-button ui-state-default fg-button-icon-left ui-corner-all" onclick="ClearDesigner();">
                        <span class="ui-icon ui-icon-minus"></span>Clear</button>
                    <button class="fg-button ui-state-default fg-button-icon-left ui-corner-all" onclick="if(CreateChannel())$('#channelButton').click();">
                        <span class="ui-icon ui-icon-plus"></span>Add channel</button>
                </div>
            </div>
                <table style="color: white;">
                    <tr>
                        <td>
                            <fieldset class="ui-corner-all inputBox">
                                <legend>Name</legend>
                                <input id="newName" /></fieldset>
                            <fieldset class="ui-corner-all inputBox">
                                <legend>Base</legend>
                                <select id="newSet" onchange="newValues.disabled = this.selectedIndex == 0; newOrder.disabled = this.selectedIndex > 1;">
                                    <option value="">Everyting</option>
                                    <option value="tag">Tag(s)</option>
                                    <option value="artist">Artist(s)</option>
                                    <option value="album">Album(s)</option>
                                    <option value="playlist">Playlist(s)</option>
                                    <option value="jamradio">JamRadio(s)</option>
                                    <option value="user">User starred albums</option>
                                </select></fieldset>
                            <fieldset class="ui-corner-all inputBox">
                                <legend>Tendency</legend>
                                <select id="newOrder">
                                    <option value="random">Completely Random</option>
                                    <option value="releasedate_desc">Release date</option>
                                    <option value="rating_desc">Rating</option>
                                    <option value="ratingweek_desc">Rating (weekly)</option>
                                    <option value="ratingmonth_desc">Rating (monthy)</option>
                                    <option value="playlisted_desc">Playlisted</option>
                                    <option value="downloaded_desc">Downloaded</option>
                                    <option value="listened_desc">Listened</option>
                                    <option value="starred_desc">Favourited</option>
                                </select></fieldset>
                        </td>
                        <td style="vertical-align: top;">
                            <fieldset class="ui-corner-all inputBox">
                                <legend>Criteria</legend>
                                <textarea id="newValues" rows="6" cols="25" disabled="disabled" onblur="this.value = this.value.replace(/\n+/, '\n').replace(/\n*$/, '');"></textarea></fieldset>
                        </td>
                    </tr>
                </table>
        </div>
	</div>
    <div id="presetContext" class="ui-helper-hidden ui-widget-header ui-corner-all contextMenu">
        <ul style="width: 300px;">
            <li class="fg-button ui-state-default ui-corner-all" onclick="$('#jamradioContext').css('left', event.pageX -5).css('top', event.pageY -5).show(500)">
                JamRadios...</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="$('#electronicaContext').css('left', event.pageX -5).css('top', event.pageY -5).show(500)">
                Electronica...</li>
			<li class="fg-button ui-state-default ui-corner-all" onclick="$('#popContext').css('left', event.pageX -5).css('top', event.pageY -5).show(500)">
                Pop and rock...</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="$('#classicContext').css('left', event.pageX -5).css('top', event.pageY -5).show(500)">
                Acoustic and classical...</li>
    </div>
    <div id="jamradioContext" class="ui-helper-hidden ui-widget-header ui-corner-all contextMenu">
        <ul style="width: 300px;">
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Dance / Electro', '+radio_track_inradioplaylist/?order=random&radio_id=4');">
                Dance / Electro</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Hip-Hop', '+radio_track_inradioplaylist/?order=random&radio_id=5');">
                Hip-Hop</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Jazz', '+radio_track_inradioplaylist/?order=random&radio_id=6');">
                Jazz</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Lounge', '+radio_track_inradioplaylist/?order=random&radio_id=7');">
                Lounge</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Metal', '+radio_track_inradioplaylist/?order=random&radio_id=283');">
                Metal</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Pop / Songwriting', '+radio_track_inradioplaylist/?order=random&radio_id=8');">
                Pop / Songwriting</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Rock', '+radio_track_inradioplaylist/?order=random&radio_id=9');">
                Rock</li>
        </ul>
    </div>
	<div id="electronicaContext" class="ui-helper-hidden ui-widget-header ui-corner-all contextMenu">
        <ul style="width: 300px;">
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Trance/Goa', '/?order=random&artist_idstr=subatomicglue+psydom+nexus+red.nebula+secret.side+xl.ant+six');">
                Trance/Goa</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Chillout', '+album_tag/?tag_idstr=ambient+chillout&order=rating_desc');">
                Chillout</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('8-Bit / Demoscene', '+album_tag/?tag_idstr=8bit+demoscene&order=starred_desc');">
                8-Bit / Demoscene</li>
        </ul>
    </div>
    <div id="popContext" class="ui-helper-hidden ui-widget-header ui-corner-all contextMenu">
        <ul style="width: 300px;">
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Indie Pop', '/?order=random&album_id=20784+7098+23755+43195+6339+56070+9604+38655+53847');">
                Indie pop</li>
			<li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Folk', '+album_tag/?tag_idstr=chanson+folk&order=rating_desc');">
                Folk</li>
			<li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Rock', '+album_tag/?tag_idstr=progressive+rock&order=rating_desc');">
                Rock</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Metal', '/?order=random&artist_idstr=antarhes+holy.pain+cynism+weirdland+scoldt+nocreeps+arai');">
                Metal</li>			
        </ul>
    </div>
	<div id="classicContext" class="ui-helper-hidden ui-widget-header ui-corner-all contextMenu">
        <ul style="width: 300px;">
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Piano', '/?order=random&album_id=29114+29279+2007+53704+55571+56448+45056+44920+45611');">
                Piano</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Orchestral', '/?order=random&album_id=43099+38846+44547+4383+3097+16649+36771');">
                Orchestral</li>
            <li class="fg-button ui-state-default ui-corner-all" onclick="AddChannel('Opera', '+album_tag/?tag_idstr=opera&order=rating_desc');">
                Opera</li>
        </ul>
    </div></body>
</html>
